<script src="app/controllers/blogs/SiteManagementController.js"></script>
<!-- Menu Navigation -->
<div class="hfr-nav container hfr-margin-auto">
	<a href="#/"><span class="ti-home"></span> Dashboard</a>
	<div class="right">
		<a href="#/monitor-posted">Monitor Posted</a>
	</div>
</div>
<!-- Site Management -->
<div id="hfr-siteManagement" class="hfr-margin-auto container" ng-controller="SitemapManagementController">
	<h2 class="hfr-heading">Site Management</h2>
	<form method="post" action="">

		<ul class="hfr-listSite">
			<li>
				<div class="number">#</div>
				<div class="hfr-listSiteInfo row">
					<div class="col-md-9">Sitename</div>
					<div class="col-md-3 content-right" ng-click="show_filter()">
						<span class="hfr-btnFilter"><span class="ti-filter"></span> Filter</span>
					</div>
				</div>
			</li>
			<li class="hfr-siteFilter" ng-show="showFilter">
				<h4>Site Type</h4>
				<ul class="hfr-inputStyle list-6-cols">
					<li>
						<input type="radio" id="hfr-siteTypeAll" name="hfr-siteType" ng-model="siteType" value="All" ng-checked="true">
						<label for="hfr-siteTypeAll">All</label>
					</li>
					<li>
						<input type="radio" id="hfr-siteTypeWordpress" name="hfr-siteType" ng-model="siteType" value="Wordpress">
						<label for="hfr-siteTypeWordpress">Wordpress</label>
					</li>
					<li>
						<input type="radio" id="hfr-siteTypeBlogger" name="hfr-siteType" ng-model="siteType" value="Blogger">
						<label for="hfr-siteTypeBlogger">Blogger</label>
					</li>
				</ul>
				<h4>Categories</h4>
				<ul class="hfr-inputStyle list-6-cols">
					<li ng-repeat="topic in topics">
						<input type="checkbox" id="hft-topic-{{topic.id}}" name="hft-topic-{{topic.id}}" ng-model="checkTopic[topic.id]"/>
						<label for="hft-topic-{{topic.id}}">{{topic.name}}</label>
					</li>
				</ul>
			</li>
			<!-- Repeat blog -->
			<li ng-repeat="blog in showBlogs">
				<div class="number">{{$index + 1}}</div>
				<div class="hfr-listSiteInfo row">
					<div class="col-md-7 siteName">{{blog.url}}</div>
					<div class="col-md-5 action">
						<a class="hfr-button-blue hfr-button-small hfr-btnViewSitemap" ng-click="viewSitemap(blog.url)" href><span class="ti-plus"></span> <span>View</span><span>Hide</span> Sitemap</a>
						<a class="hfr-button-blue hfr-button-small" href><span class="ti-pencil"></span> Edit</a>
					</div>
				</div>
				
				<div class="hfr-viewSitemap" ng-show="showSelector[blog.url]">
					<table class="table">
						<thead>
							<tr>
								<th>Sitemap</th>
								<th>Topic</th>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<tr ng-repeat="selector in selectors[blog.url]">
								<td><a href="{{selector.sitemapId}}" target="_blank" data-container="body" data-toggle="tooltip" data-placement="right" title="View Selector">{{selector.sitemapId}}</a></td>
								<td>
								<span ng-repeat="topic in selector.topics"><span ng-if="$index > 0">, </span>{{topic.name}}</span>
								</td>
								<td><a href ng-click="editSitemap(selector.id)">Edit</a></td>
							</tr>
							
						</tbody>
					</table>			
					<hr />
					
					<div class="row">
						<div class="col-md-6">
						</div>
						<div class="col-md-6 content-right">
							<a href class="hfr-button-blue hfr-solid" ng-click="addSitemap()">Add Sitemap</a>
						</div>
					</div>
				</div>
			</li>
		</ul>
	</form>
</div>